package com.ddone.spring5;

import com.ddone.spring5.bean.User;
import com.ddone.spring5.config.Spring5Config;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

/**
 * @author ddone
 * @date 2024/3/21-02:34
 */
@SpringJUnitConfig(classes = {Spring5Config.class})
@Slf4j
// @SpringJUnitConfig(locations = {"classpath:application-spring5.xml"})
public class Spring5Test {

    @Autowired
    @Qualifier("user4")
    private User user;


    @Test
    public void testSpring5(){
        log.warn("user = " + user);
        System.out.println("user = " + user);
    }
}
